package com.ysfxt.controller;


import com.ysfxt.model.SysUser;
import com.ysfxt.result.Result;
import com.ysfxt.service.SysUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ysfxt
 * @since 2024-03-29
 */
@RestController
@RequestMapping("/api/sys-user")
public class SysUserController {
    
    @Resource
    private SysUserService sysUserService;
    
    /**
     * 管理员登录
     * @param sysUser
     * @return
     */
    @PostMapping("login")
    public Result SysUserLogin(@RequestBody SysUser sysUser){
        return sysUserService.login(sysUser);
    }

}

